package repository;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class EndPoint {

	public static String SPARQL_ENDPOINT = "http://dblp.rkbexplorer.com/sparql/";

	public static String[] ENDPOINTS = { "http://oai.rkbexplorer.com/sparql/",
			"http://dblp.rkbexplorer.com/sparql/",
			"http://dotac.rkbexplorer.com/sparql/",
			"http://kisti.rkbexplorer.com/sparql/",
			"http://acm.rkbexplorer.com/sparql/",
			"http://nsf.rkbexplorer.com/sparql/",
			"http://eprints.rkbexplorer.com/sparql/",
			"http://citeseer.rkbexplorer.com/sparql/",
			"http://rae2001.rkbexplorer.com/sparql/",
			"http://unlocode.rkbexplorer.com/sparql/",
			"http://risks.rkbexplorer.com/sparql/",
			"http://southampton.rkbexplorer.com/sparql/",
			"http://irit.rkbexplorer.com/sparql/",
			"http://os.rkbexplorer.com/sparql/",
			"http://era.rkbexplorer.com/sparql/",
			"http://ieee.rkbexplorer.com/sparql/",
			"http://newcastle.rkbexplorer.com/sparql/",
			"http://jisc.rkbexplorer.com/sparql/",
			"http://resex.rkbexplorer.com/sparql/",
			"http://laas.rkbexplorer.com/sparql/",
			"http://courseware.rkbexplorer.com/sparql/",
			"http://ibm.rkbexplorer.com/sparql/",
			"http://wiki.rkbexplorer.com/sparql/",
			"http://pisa.rkbexplorer.com/sparql/",
			"http://budapest.rkbexplorer.com/sparql/",
			"http://roma.rkbexplorer.com/sparql/",
			"http://deploy.rkbexplorer.com/sparql/",
			"http://eurecom.rkbexplorer.com/sparql/",
			"http://ulm.rkbexplorer.com/sparql/",
			"http://ft.rkbexplorer.com/sparql/",
			"http://deepblue.rkbexplorer.com/sparql/",
			"http://curriculum.rkbexplorer.com/sparql/",
			"http://darmstadt.rkbexplorer.com/sparql/" };

	public String[] getList() {
		return ENDPOINTS;
	}

	public static void main(String[] args) {

		Statement statement;
		try {

			Connection connection = FactoryConnection.getInstance()
					.getConnection();
			statement = connection.createStatement();
			for (int i = 0; i < ENDPOINTS.length; i++) {

				statement
						.executeUpdate("INSERT INTO end_point (end_point) VALUES('"
								+ ENDPOINTS[i] + "');");

				System.out.println("Inserir o endPoints com sucesso!"
						+ ENDPOINTS[i]);
			}

		} catch (SQLException e) {
			System.out.println("Erro na tentar inserir endPoints na  - "
					+ EndPoint.class + "  " + e.getMessage());

		} catch (ClassNotFoundException e) {
			System.out.println("Erro na tentar inserir endPoints na  - "
					+ EndPoint.class + "  " + e.getMessage());
		}

	}

}
